package com.springtest.demo.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonView;
import com.springtest.demo.views.StudentView;

@Entity
@Table(name="student")
public class Student implements Serializable{
	private static final long serialVersionUID = 1L; 
	
	@Id
	@Column(name="id")
	@JsonView(StudentView.StudentId.class)
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	
	@Column(name="studentname")
	@JsonView(StudentView.StudentName.class)
	private String studentname;
	
	@Column(name="password")
	@JsonView(StudentView.StudentPass.class)
	private String password;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getStudentname() {
		return studentname;
	}

	public void setStudentname(String studentname) {
		this.studentname = studentname;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
 	
	
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                